<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  if (!tep_session_is_registered('customer_id')) {
    $navigation->set_snapshot();
    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
  }

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT);

  $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

  require(DIR_WS_INCLUDES . 'template_top.php');
?>

<?php if ($oscTemplate->hasBlocks('boxes_column_left')) {  ?>

    <aside id="modLeftContainer">
    <?php echo $oscTemplate->getBlocks('boxes_column_left'); ?>
    </aside>

  <?php }  ?>
<section id="myAccountInfo">

<h1><?php echo HEADING_TITLE; ?></h1>

<?php
  if ($messageStack->size('account') > 0) { 
    echo $messageStack->output('account');
  }
?>

    <div id="myAccount">
    <h2><?php echo MY_ACCOUNT_TITLE; ?></h2>


        <ul>
            <li id="viewAccountInfo"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . MY_ACCOUNT_INFORMATION . '</a>'; ?></li>
            <li id="viewAddressBook"><?php echo '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . MY_ACCOUNT_ADDRESS_BOOK . '</a>'; ?></li>
            <li id="changePassword"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></li>
        </ul>
    </div>

    <div id="myOrders">
    <h2><?php echo MY_ORDERS_TITLE; ?></h2>


        <ul>
            <li id="viewOrders"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . MY_ORDERS_VIEW . '</a>'; ?></li>
        </ul>
    </div>

    <div id="emailNotifications">
    <h2><?php echo EMAIL_NOTIFICATIONS_TITLE; ?></h2>

        <ul>
            <li id="subscribe"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL') . '">' . EMAIL_NOTIFICATIONS_NEWSLETTERS . '</a>'; ?></li>
            <li id="viewProductList"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' . EMAIL_NOTIFICATIONS_PRODUCTS . '</a>'; ?></li>
        </ul>
    </div>

</section>
    <?php if ($oscTemplate->hasBlocks('boxes_column_right')) { ?>

    <aside id="modRightContainer">
      <?php echo $oscTemplate->getBlocks('boxes_column_right'); ?>
    </aside>

<?php
  }
?>

<?php
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
